var BallView = JW.UI.Component.extend({
	ball : null, // Ball
	
	el   : null, // jQuery element
	
	render: function()
	{
		this._super();
		
		this.el.css({
			width  : (this.ball.r * 2) + "px",
			height : (this.ball.r * 2) + "px",
			
			"-webkit-border-radius" : this.ball.r + "px"
		});
		
		this.updatePosition();
	},	
	updatePosition: function()
	{
		this.el.css({
			left	: this.ball.x - this.ball.r,
			top		: this.ball.y - this.ball.r
		});
	}
});

JW.UI.template(BallView, {
	main: '<div jwclass="ball" />'
});
